<template>
  <div class="content">
    <div class="one">
      one
    </div>
    <div class="two">
      two
    </div>
<!--    测试高度和边距百分比设置-->
    <div class="height-persent">
<!--      高度-->
    </div>
  </div>
</template>

<script>
export default {
  name: 'index'
}
</script>

<style scoped lang="scss">
  $color: red;
  $width: 200px;
  $height: 300px;
  @mixin base($width:20px){
    width: $width;
    height: $height;
    background-color: $color;
  }
  .content{
    @include base(100px);
  }
  .base {
    background-color: #2c3e50;
    color: #42b983;
    width: 30px;
    height: 30px;
  }
  .one {
    @extend .base;
    font-size: 14px;
  }
  .two {
    @extend .base;
    font-size: 20px;
  }
  .height-persent{
    /*width: 100px;*/
    background-color: salmon;
    padding: 50%;
  }
</style>
